<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<script src="http://code.google.com/apis/gears/gears_init.js" type="text/javascript" charset="utf-8"></script>
<script src="js/geo.js" type="text/javascript" charset="utf-8"></script>

</head> 

<body>
	<script>
		if(geo_position_js.init()){
			geo_position_js.getCurrentPosition(success_callback,error_callback,{enableHighAccuracy:true,options:5000});
		}
		else{
			alert("Functionality not available");
		}

		function success_callback(p)
		{
                        location.replace('/index2?lat=' + p.coords.latitude.toFixed(2) + '&lon=' + p.coords.longitude.toFixed(2));
			//alert('lat='+p.coords.latitude.toFixed(2)+';lon='+p.coords.longitude.toFixed(2));
		}
		
		function error_callback(p)
		{
			alert('error='+p.message);
		}		
	</script>
</body>

</html>
